\(\int \frac {1}{(d+e x^n) (a+b x^n+c x^{2 n})} \, dx\) [72]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F(-2)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 26, antiderivative size = 243 \[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=-\frac {c \left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c-b \sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )}-\frac {c \left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\left (b+\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )}+\frac {e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )} \]

[Out]

e^2*x*hypergeom([1, 1/n],[1+1/n],-e*x^n/d)/d/(a*e^2-b*d*e+c*d^2)-c*x*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b+(-
4*a*c+b^2)^(1/2)))*(e+(-b*e+2*c*d)/(-4*a*c+b^2)^(1/2))/(a*e^2-b*d*e+c*d^2)/(b+(-4*a*c+b^2)^(1/2))-c*x*hypergeo
m([1, 1/n],[1+1/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))*(2*c*d-e*(b+(-4*a*c+b^2)^(1/2)))/(a*e^2-b*d*e+c*d^2)/(b^2-
4*a*c-b*(-4*a*c+b^2)^(1/2))

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1438, 251, 1436} \[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=-\frac {c x \left (2 c d-e \left (\sqrt {b^2-4 a c}+b\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\left (-b \sqrt {b^2-4 a c}-4 a c+b^2\right ) \left (a e^2-b d e+c d^2\right )}-\frac {c x \left (\frac {2 c d-b e}{\sqrt {b^2-4 a c}}+e\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\left (\sqrt {b^2-4 a c}+b\right ) \left (a e^2-b d e+c d^2\right )}+\frac {e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {e x^n}{d}\right )}{d \left (a e^2-b d e+c d^2\right )} \]

[In]

Int[1/((d + e*x^n)*(a + b*x^n + c*x^(2*n))),x]

[Out]

-((c*(2*c*d - (b + Sqrt[b^2 - 4*a*c])*e)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 -
 4*a*c])])/((b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*(c*d^2 - b*d*e + a*e^2))) - (c*(e + (2*c*d - b*e)/Sqrt[b^2 - 4
*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((b + Sqrt[b^2 - 4*a*c]
)*(c*d^2 - b*d*e + a*e^2)) + (e^2*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((e*x^n)/d)])/(d*(c*d^2 - b*d*e
+ a*e^2))

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 1436

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rule 1438

Int[((d_) + (e_.)*(x_)^(n_))^(q_)/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> Int[ExpandIntegran
d[(d + e*x^n)^q/(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4
*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[q]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {e^2}{\left (c d^2-b d e+a e^2\right ) \left (d+e x^n\right )}+\frac {c d-b e-c e x^n}{\left (c d^2-b d e+a e^2\right ) \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx \\ & = \frac {\int \frac {c d-b e-c e x^n}{a+b x^n+c x^{2 n}} \, dx}{c d^2-b d e+a e^2}+\frac {e^2 \int \frac {1}{d+e x^n} \, dx}{c d^2-b d e+a e^2} \\ & = \frac {e^2 x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )}-\frac {\left (c \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 \left (c d^2-b d e+a e^2\right )}-\frac {\left (c \left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 \left (c d^2-b d e+a e^2\right )} \\ & = -\frac {c \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\left (b-\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )}-\frac {c \left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\left (b+\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )}+\frac {e^2 x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.43 (sec) , antiderivative size = 200, normalized size of antiderivative = 0.82 \[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\frac {x \left (-\frac {c \left (e+\frac {-2 c d+b e}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )}{b-\sqrt {b^2-4 a c}}-\frac {c \left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b+\sqrt {b^2-4 a c}}+\frac {e^2 \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {e x^n}{d}\right )}{d}\right )}{c d^2+e (-b d+a e)} \]

[In]

Integrate[1/((d + e*x^n)*(a + b*x^n + c*x^(2*n))),x]

[Out]

(x*(-((c*(e + (-2*c*d + b*e)/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[
b^2 - 4*a*c])])/(b - Sqrt[b^2 - 4*a*c])) - (c*(e + (2*c*d - b*e)/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1
), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b + Sqrt[b^2 - 4*a*c]) + (e^2*Hypergeometric2F1[1, n^(-1)
, 1 + n^(-1), -((e*x^n)/d)])/d))/(c*d^2 + e*(-(b*d) + a*e))

Maple [F]

\[\int \frac {1}{\left (d +e \,x^{n}\right ) \left (a +b \,x^{n}+c \,x^{2 n}\right )}d x\]

[In]

int(1/(d+e*x^n)/(a+b*x^n+c*x^(2*n)),x)

[Out]

int(1/(d+e*x^n)/(a+b*x^n+c*x^(2*n)),x)

Fricas [F]

\[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} {\left (e x^{n} + d\right )}} \,d x } \]

[In]

integrate(1/(d+e*x^n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

integral(1/(b*e*x^(2*n) + a*d + (c*e*x^n + c*d)*x^(2*n) + (b*d + a*e)*x^n), x)

Sympy [F(-2)]

Exception generated. \[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\text {Exception raised: HeuristicGCDFailed} \]

[In]

integrate(1/(d+e*x**n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

Maxima [F]

\[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} {\left (e x^{n} + d\right )}} \,d x } \]

[In]

integrate(1/(d+e*x^n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

integrate(1/((c*x^(2*n) + b*x^n + a)*(e*x^n + d)), x)

Giac [F]

\[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} {\left (e x^{n} + d\right )}} \,d x } \]

[In]

integrate(1/(d+e*x^n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(1/((c*x^(2*n) + b*x^n + a)*(e*x^n + d)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right )} \, dx=\int \frac {1}{\left (d+e\,x^n\right )\,\left (a+b\,x^n+c\,x^{2\,n}\right )} \,d x \]

[In]

int(1/((d + e*x^n)*(a + b*x^n + c*x^(2*n))),x)

[Out]

int(1/((d + e*x^n)*(a + b*x^n + c*x^(2*n))), x)